<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Meshhatoh Admin</title>
        <script type="text/javascript" src="http://maps.google.com/maps/api/js?key=AIzaSyBygx3oVSEUehAD3YZhNuEUngTDsSfDHRc&amp;sensor=false"></script>
        <h:outputStylesheet library="css" name="animate.css"/>
        <h:outputStylesheet library="css" name="bootstrap.min.css"/>
        <h:outputStylesheet library="css" name="font-awesome.min.css"/>
        <h:outputStylesheet library="css" name="templatemo_misc.css"/>
        <h:outputStylesheet library="css" name="templatemo_style.css"/>
        <h:outputStylesheet library="css" name="mystyle.css"/>
    </h:head>
    <h:body>
        <div id="large_container" >
            <div class="site-header">
                <div class="main-navigation">
                    <div class="container">
                        <div class="row">
                            <div class="col-md-12 responsive-menu">
                                <a href="#" class="menu-toggle-btn">
                                    <i class="fa fa-bars">sss</i>
                                </a>
                            </div> <!-- /.col-md-12 -->
                            <div class="col-md-12 main_menu">
                                <h:form>
                                    <ul>
                                        <li><a class="show-1 templatemo_home" href="#">Attribute Type</a> </li><img class="split" src="http://localhost:8080/GPAdminWebApplication/resources/images/nav/split.gif" />
                                        <li><p:commandLink styleClass="show-2 templatemo_page2"  update=":editTSTForm:tbl,:allform:tbedit" actionListener="#{TSTBean.updateattributeTypesModel()}" value="Transportation Service Type"/></li><img class="split" src="http://localhost:8080/GPAdminWebApplication/resources/images/nav/split.gif" />
                                        <li><p:commandLink styleClass="show-3 templatemo_page3" value="Transportation Service Type Attribute">
                                                <p:ajax event="click" update=":editTSForm:enewatt" listener="#{viewAndEditTranServiceBean.updateatints()}"/>
                                                <p:ajax event="click" update=":addTSForm:newatt" listener="#{tranServiceBeanWizerd.updateatints()}"/>
                                                <p:ajax event="click" update=":editTSForm:city" listener="#{viewAndEditTranServiceBean.updatetstints()}"/>
                                                <p:ajax event="click" update=":addTSForm:ecity" listener="#{tranServiceBeanWizerd.updatetstints()}"/>
                                            </p:commandLink></li><img class="split" src="http://localhost:8080/GPAdminWebApplication/resources/images/nav/split.gif" />
                                        <li><a class="show-4 templatemo_page4" href="#">Users</a></li>
                                    </ul>
                                </h:form>
                            </div> <!-- /.col-md-12 -->
                        </div> <!-- /.row -->
                    </div> <!-- /.container -->
                </div> <!-- /.main-navigation -->
            </div> <!-- /.site-header -->
            <div id="menu-container">
                <div class="content homepage" id="menu-1">
                    <div class="container">
                        <div class="row">
                            <div class="col-md-9 col-sm-10">
                                <div class="about-us-content">
                                    <div class="toggle-content" id="tab7">
                                        <h:form id="attForm">
                                            <h:panelGrid width="700px" bgcolor="#e6edfd"  border="0"> 
                                                <p:dataTable  id="tb1" var="att" editable="true" scrollable="true" scrollHeight="500"  value="#{attributebean.attributeTypes}">
                                                    <p:ajax event="rowEdit" listener="#{attributebean.onEdit}" update="tb1" />
                                                    <p:ajax event="rowEditCancel" listener="#{attributebean.onCancel}" />
                                                    <p:column headerText="Name" style="width:25%">
                                                        <p:cellEditor>
                                                            <f:facet name="output">
                                                                <h:outputText value="#{att.name}" />
                                                            </f:facet>
                                                            <f:facet name="input">
                                                                <p:inputText validatorMessage="invalid Name " value="#{att.name}" style="width:100%">
                                                                    <f:validateRegex  pattern="^[a-zA-Z]+( [a-zA-Z]+)*$"/> 
                                                                </p:inputText>
                                                            </f:facet>
                                                        </p:cellEditor>
                                                    </p:column>
                                                    <p:column headerText="Is Number?" style="width:25%">
                                                        <p:cellEditor>
                                                            <f:facet name="output">
                                                                <h:outputText value="#{att.isNumber}" style="width:100%" />
                                                            </f:facet>
                                                            <f:facet name="input"  >
                                                                <p:selectBooleanCheckbox value="#{att.isNumber}" />
                                                            </f:facet>
                                                        </p:cellEditor>
                                                    </p:column>

                                                    <p:column headerText="Edit" style="width:10%">
                                                        <p:rowEditor />
                                                    </p:column>
                                                    <p:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Delete"/>
                                                        </f:facet>

                                                        <p:commandButton value="Delete" actionListener="#{attributebean.deleteBean}" update=":attForm:tb1">
                                                        </p:commandButton>
                                                    </p:column>
                                                </p:dataTable> 
                                            </h:panelGrid>
                                        </h:form>
                                    </div> <!-- /.toggle-content -->
                                    <div class="toggle-content" id="tab8">
                                        <h:form id="addAttForm">
                                            <p:tooltip style="width: 500px;" />
                                            <p:messages style="width: 500px;" id="messages2" showDetail="true" autoUpdate="false" closable="true" />
                                            <center>
                                                <h2 class="page-title">Add Attribute</h2>
                                                <h:outputText value="Name: "  />
                                                <br/>
                                                <h:inputText id="attname" validatorMessage="invalid Name " required="true" requiredMessage="Must enter Attribute name" styleClass="mytext" value="#{attributebean.attributeType.name}" size="14" >
                                                    <f:validateRegex  pattern="^[a-zA-Z]+( [a-zA-Z]+)*$"/> 
                                                </h:inputText>
                                                <br/>
                                                <h:outputText value="Is Number: "  /> 
                                                <br/>
                                                <p:selectBooleanCheckbox id="isnum" value="#{attributebean.attributeType.isNumber}" />
                                                <br/><br/>

                                                <p:commandButton update=":attForm:tb1,messages2,:editTSTForm:tbl,:allform:tbedit" value="Add Attribute Type" actionListener="#{attributebean.addAttributeType}" >

                                                </p:commandButton>
                                            </center>
                                            <br/>
                                        </h:form>
                                    </div> <!-- /.toggle-content -->
                                </div> <!-- /.inner-content -->
                            </div> <!-- /.col-md-9 -->
                            <div class="col-md-3 col-sm-2">
                                <div id="icons-about">
                                    <ul class="tabs">
                                        <li>
                                            <a href="#tab7" class="icon-item">
                                                <span>View</span>
                                            </a> <!-- /.icon-item -->
                                        </li>
                                        <li>
                                            <a href="#tab8" class="icon-item">
                                                <span>Add</span>
                                            </a> <!-- /.icon-item -->
                                        </li>
                                    </ul>
                                </div> <!-- /.icons -->
                            </div> <!-- /.col-md-3 -->		
                        </div> <!-- /.row -->
                    </div> <!-- /.slide-item -->
                </div> <!-- /.homepage -->

                <div class="content products" id="menu-2">
                    <div class="container">
                        <div class="row">
                            <div class="col-md-9 col-sm-10">
                                <div class="about-us-content">
                                    <div class="toggle-content" id="tab10">
                                        <h:form id="tstForm">
                                            <h:panelGrid >  
                                                <p:dataTable id="tb2" scrollable="true" scrollHeight="500" value="#{AllTransService.transTypesArr}" rowKey="#{att.id}"  var="att" selection="#{AllTransService.edittst}"  selectionMode="single" >  
                                                    <p:ajax event="rowSelect" oncomplete="openMyDiv()"   listener="#{AllTransService.loadtst}" update=":editTSTForm:tbl,:editTSTForm:namee"  />
                                                    <p:column>  
                                                        <f:facet name="header">  
                                                            <h:outputText value="TST NAME" />  
                                                        </f:facet>  
                                                        <h:outputText value="#{att.name}" />  
                                                    </p:column> 
                                                    <p:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Delete"/>
                                                        </f:facet>
                                                        <center>
                                                            <p:commandButton value="Delete" actionListener="#{AllTransService.deleteTS()}" update=":tstForm:tb2">
                                                            </p:commandButton>
                                                        </center>  
                                                    </p:column>
                                                </p:dataTable>
                                            </h:panelGrid>     
                                        </h:form>
                                    </div> <!-- /.toggle-content -->
                                    <div class="toggle-content" id="tab11">
                                        <h:form id="editTSTForm">
                                            <p:tooltip style="width: 500px;" />
                                            <p:messages style="width: 500px;" id="messages33" showDetail="true" autoUpdate="true" closable="false" />
                                            <center><h:outputText value="TransportationServiceType Attributes" style="color:#b10021;font-size:18px;" /></center>
                                            <br/>
                                            <center><h:outputText value="Name" style="color:#b10021;font-size:16px;" /> 
                                                <h:inputText validatorMessage="invalid Name " id="namee" style="padding: 0px; border: 1px solid #cfcfcf !important; margin: 5px; border-radius: 5px; " value="#{AllTransService.TSTName}" >
                                                    <f:validateRegex  pattern="^[a-zA-Z]+( [a-zA-Z]+)*$"/> 
                                                </h:inputText>
                                                <p:commandButton update=":tstForm:tb2"  value="Edit Name" type="submit"  action="#{AllTransService.editName}" />
                                            </center>
                                            <br/>
                                            <p:dataTable id="tbl" var="att" editable="true" scrollable="true"   value="#{AllTransService.TSattributeTypesModel}">
                                                <p:ajax event="rowEdit" listener="#{AllTransService.onEdit}"  />
                                                <p:ajax event="rowEditCancel" listener="#{AllTransService.onCancel}" />
                                                <p:column headerText="att name" style="width:24%"> 
                                                    <p:cellEditor>
                                                        <f:facet name="output">
                                                            <h:outputText value="#{att.attributeType.name}" />
                                                        </f:facet>
                                                        <f:facet name="input">
                                                            <p:selectOneMenu  id="attlistintst" value="#{att.attributeType.name}" >
                                                                <f:selectItems value="#{attributebean.ats}"
                                                                               var="man"
                                                                               itemLabel="#{man.name}"
                                                                               itemValue="#{man.name}" />
                                                            </p:selectOneMenu>
                                                        </f:facet>
                                                    </p:cellEditor>
                                                    <f:facet name="footer">
                                                        <p:selectOneMenu value="#{AllTransService.attributeId}" id="attselectt">
                                                            <f:selectItems value="#{TSTBean.attributeTypesModel}" var="att"
                                                                           itemLabel="#{att.name}" itemValue="#{att.id}" id="attselectitemm" />
                                                        </p:selectOneMenu>
                                                    </f:facet>
                                                </p:column>
                                                <p:column headerText="Value" style="width:25%">
                                                    <p:cellEditor>
                                                        <f:facet name="output">
                                                            <h:outputText value="#{att.value}" />
                                                        </f:facet>
                                                        <f:facet name="input">
                                                            <p:inputText validatorMessage="invalid Name " value="#{att.value}" style="width:100%">
                                                                <f:validateRegex pattern="[a-zA-Z0-9]*$" />
                                                            </p:inputText>
                                                        </f:facet>
                                                    </p:cellEditor>
                                                    <f:facet name="footer">
                                                        <h:inputText style="padding: 0px; border: 1px solid #cfcfcf !important; margin: 5px; border-radius: 5px; " id="valuee" value="#{AllTransService.attValue}" />
                                                        <p:commandButton update=":editTSTForm:tbl,:editTSTForm:messages33" actionListener="#{AllTransService.getAttributesAdded()}"  style="-webkit-appearance: button; cursor: pointer; padding: 3px;" value="Add Attribute"/>
                                                    </f:facet>
                                                </p:column>
                                                <p:column style="width:6%">
                                                    <p:rowEditor />
                                                </p:column>
                                                <p:column>
                                                    <f:facet name="header">
                                                        <h:outputText value="Delete"/>
                                                    </f:facet>
                                                    <center>
                                                        <p:commandButton value="Delete" actionListener="#{AllTransService.deleteTST()}" update=":editTSTForm:tbl">
                                                        </p:commandButton>
                                                    </center>  
                                                </p:column>
                                            </p:dataTable>
                                        </h:form>
                                    </div> <!-- /.toggle-content -->
                                    <div class="toggle-content" id="tab12">
                                        <h:form id="allform">
                                            <p:tooltip style="width: 500px;" />
                                            <p:messages style="width: 500px;" id="messages3" showDetail="true" autoUpdate="false" closable="true" />
                                            <center>
                                                <h:outputText value="ADD TransportationServiceType" style="color:#b10021;font-size:18px;" />
                                            </center><br/><br/>
                                            <center><h:outputText value="Name " style="color:#b10021;font-size:16px;" />
                                                <h:inputText style="padding: 1px; border: 1px solid #cfcfcf !important; margin: 5px; border-radius: 5px;" value="#{TSTBean.TSTName}" />
                                            </center>   
                                            <p:dataTable id="tbedit" var="varr" editable="true" scrollable="true"  value="#{TSTBean.TSattributeTypes}">
                                                <p:ajax event="rowEdit" listener="#{TSTBean.onEdit1}" update=":allform:messages3" />
                                                <p:ajax event="rowEditCancel" listener="#{TSTBean.onCancel}" update=":allform:messages3" />
                                                <p:column headerText="Name" style="width:25%">
                                                    <p:cellEditor>
                                                        <f:facet name="output">
                                                            <h:outputText value="#{varr.attributeType.name}" />
                                                        </f:facet>
                                                        <f:facet name="input">
                                                            <h:selectOneMenu value="#{varr.attributeType.name}" >
                                                                <f:selectItems value="#{attributebean.attributeTypes}"
                                                                               var="man"
                                                                               itemLabel="#{man.name}"
                                                                               itemValue="#{man.name}" />
                                                            </h:selectOneMenu>
                                                        </f:facet>
                                                    </p:cellEditor>
                                                    <f:facet name="footer" id="fotter1">  
                                                        <p:selectOneMenu value="#{TSTBean.attributeId}" id="attselect">
                                                            <f:selectItems value="#{TSTBean.attributeTypesModel}" var="att"
                                                                           itemLabel="#{att.name}" itemValue="#{att.id}" id="attselectitem" />
                                                        </p:selectOneMenu>

                                                    </f:facet> 
                                                </p:column>
                                                <p:column headerText="Value" style="width:25%">
                                                    <p:cellEditor>
                                                        <f:facet name="output">
                                                            <h:outputText value="#{varr.value}" />
                                                        </f:facet>
                                                        <f:facet name="input">
                                                            <p:inputText value="#{varr.value}" style="width:100%"/>
                                                        </f:facet>
                                                    </p:cellEditor>

                                                    <f:facet name="footer">  
                                                        <h:inputText style="padding: 0px; border: 1px solid #cfcfcf !important; margin: 5px; border-radius: 5px; " id="valuee" value="#{TSTBean.attValue}" />
                                                        <p:commandButton update=":allform:tbedit,:allform:messages3" actionListener="#{TSTBean.getShowAttributesAdded()}"  style="-webkit-appearance: button; cursor: pointer; padding: 3px;" value="Add Attribute"/>
                                                        <!--<f:ajax execute="valuee selectt"  render="out"/>-->
                                                    </f:facet> 
                                                </p:column>
                                                <p:column style="width:6%">
                                                    <p:rowEditor />
                                                </p:column>
                                               
                                            </p:dataTable> 
                                            <br/>
                                            <center> 
                                                <p:commandButton  update=":tstForm:tb2,:allform:tbedit,messages3" value="Add TransportationServiceType" action="#{AllTransService.viewFun()}"  actionListener="#{TSTBean.getAddTransServ}" />
                                            </center>
                                        </h:form>
                                    </div> <!-- /.toggle-content -->
                                </div> <!-- /.inner-content -->
                            </div> <!-- /.col-md-9 -->
                            <div class="col-md-3 col-sm-2">
                                <div id="icons-about">
                                    <ul class="tabs">
                                        <li>
                                            <a href="#tab10" onclick="hideMyDiv()" class="icon-item">
                                                <span>View</span>
                                            </a> <!-- /.icon-item -->
                                        </li>
                                        <li style="display: none;">
                                            <a href="#tab11" class="icon-item">
                                                <span>Edit and View</span>
                                            </a> <!-- /.icon-item -->
                                        </li>
                                        <li>
                                            <a href="#tab12" onclick="hideMyDiv()" class="icon-item">
                                                <span>Add</span>
                                            </a> <!-- /.icon-item -->
                                        </li>
                                    </ul>
                                </div> <!-- /.icons -->
                            </div> <!-- /.col-md-3 -->		
                        </div> <!-- /.row -->
                    </div> <!-- /.slide-item -->
                </div> <!-- /.products -->

                <div class="content services" id="menu-3">
                    <div class="container">
                        <div class="row">
                            <div class="col-md-9 col-sm-10">
                                <div class="inner-content">
                                    <div class="toggle-content" id="tab1">
                                        <h2 class="page-title">View Transportation service</h2>
                                        <h:form id="form">
                                            <h:panelGrid columns="2"  cellpadding="10">  
                                                <p:dataTable id="tb3" rowKey="#{ts.id}" scrollable="true" scrollHeight="500" value="#{tranServiceBean.tranServices}" var="ts" selectionMode="single" selection="#{viewAndEditTranServiceBean.selectedts}">  
                                                    <p:ajax event="rowSelect" oncomplete="openMyDivts()"   listener="#{viewAndEditTranServiceBean.loadtst}" update=":editTSForm:ewiz"  />
                                                    <p:column>  
                                                        <f:facet name="header">  
                                                            <h:outputText value="name" />  
                                                        </f:facet>  
                                                        <h:outputText value="#{ts.name}"/>  
                                                    </p:column>  
                                                    <p:column>  
                                                        <f:facet name="header">  
                                                            <h:outputText value="TST" />  
                                                        </f:facet>  
                                                        <h:outputText value="#{ts.tranServiceType.name}" />  
                                                    </p:column>
                                                    <p:column>  
                                                        <f:facet name="header">  
                                                            <h:outputText value="T1" />  
                                                        </f:facet>  
                                                        <h:outputText value="#{ts.terminalByTerminal1.point.name}" />  
                                                    </p:column>  
                                                    <p:column>  
                                                        <f:facet name="header">  
                                                            <h:outputText value="T2" />  
                                                        </f:facet>  
                                                        <h:outputText value="#{ts.terminalByTerminal2.point.name}" />  
                                                    </p:column> 
                                                </p:dataTable> 
                                            </h:panelGrid>  
                                        </h:form>
                                    </div> <!-- /.toggle-content -->
                                    <div class="toggle-content" id="tab2">
                                        <h2 style="float: left;" class="page-title">Edit transportation</h2>
                                        <h:form prependId="false" id="editTSForm"  >  
                                            <p:growl id="egrowl" showDetail="true" sticky="false" life="6000"  />  
                                            <p:commandButton styleClass="btns" value="show feedback" style="left: 47em;padding-bottom: 5px !important;" oncomplete="openfeedbackdiv()" />
                                            <p:dialog resizable="false" widgetVar="edlg" id="edlg"  showEffect="fade">
                                                <h:messages errorClass="error"/>  
                                                <h:panelGrid columns="2">
                                                    <f:facet name="header">
                                                        <p:outputLabel value="New Point"/>
                                                    </f:facet>
                                                    <h:outputLabel for="etitle" value="Title:" />
                                                    <p:inputText validatorMessage="invalid Name "     id="etitle" value="#{viewAndEditTranServiceBean.title}" >
                                                        <f:validateRegex  pattern="^[a-zA-Z]+( [a-zA-Z]+)*$"/> 
                                                    </p:inputText>
                                                    <p:outputLabel for="econsole" value="Type: " />
                                                    <p:selectOneRadio   id="econsole" value="#{viewAndEditTranServiceBean.type}">
                                                        <f:selectItem itemLabel="Terminal" itemValue="Terminal" />
                                                        <f:selectItem itemLabel="Stop" itemValue="Stop" />
                                                        <f:selectItem itemLabel="Point" itemValue="Point" />
                                                    </p:selectOneRadio>
                                                    <f:facet name="footer">
                                                        <p:commandButton value="Add"   actionListener="#{viewAndEditTranServiceBean.newPoint()}" update=":editTSForm:emap,:editTSForm:emaph" oncomplete="emarkerAddComplete()" />
                                                        <p:commandButton value="Cancel"   onclick="return ecancel()" />
                                                    </f:facet>
                                                </h:panelGrid>
                                                <h:inputHidden id="eNlat" value="#{viewAndEditTranServiceBean.lat}"  />
                                                <h:inputHidden id="eNlng" value="#{viewAndEditTranServiceBean.lng}" />
                                            </p:dialog>
                                            <h:inputHidden id="et1lat" value="#{viewAndEditTranServiceBean.t1Lat}"  />
                                            <h:inputHidden id="et1lng" value="#{viewAndEditTranServiceBean.t1Lng}" />
                                            <h:inputHidden id="et2lat" value="#{viewAndEditTranServiceBean.t2Lat}" />
                                            <h:inputHidden id="et2lng" value="#{viewAndEditTranServiceBean.t2Lng}" />
                                            <h:inputHidden id="ewaypoint" value="#{viewAndEditTranServiceBean.request}" />  
                                            <h:inputHidden id="ewaypointh" value="#{viewAndEditTranServiceBean.requesth}" />  
                                            <p:wizard id="ewiz"  flowListener="#{viewAndEditTranServiceBean.onFlowProcess}"   > 
                                                <p:tab id="ets" title="Transportation Service">  
                                                    <p:panel>  
                                                        <h:messages errorClass="error"/> 
                                                        <br/>
                                                        <h:panelGrid columns="2" columnClasses="label, value" styleClass="grid">  
                                                            <h:outputText value="Name: *" />  
                                                            <br/>
                                                            <p:inputText validatorMessage="invalid Name "  id="ename" required="true" requiredMessage="Please enter Transportation Service Name!" label="Name"  
                                                                         value="#{viewAndEditTranServiceBean.tranService.name}" >
                                                                <f:validateRegex  pattern="^[a-zA-Z]+( [a-zA-Z]+)*$"/> 
                                                            </p:inputText>
                                                            <br/>
                                                            <h:outputText value="Transportation Type: *" /> 
                                                            <br/>
                                                            <p:selectOneMenu    required="true" requiredMessage="Please select Transportation Type!"  id="city" value="#{viewAndEditTranServiceBean.tstid}">

                                                                <f:selectItems  value="#{viewAndEditTranServiceBean.tST}"  />
                                                                <p:ajax  update="esuburbs,enewatt:eatt,enewatt" 
                                                                         listener="#{viewAndEditTranServiceBean.handleTSTChange()}" />
                                                            </p:selectOneMenu>
                                                            <br/>
                                                            <h:outputText value="Default Attributes" /> 
                                                            <br/>
                                                            <p:dataTable  id="esuburbs" scrollHeight="500" value="#{viewAndEditTranServiceBean.tSTAttributeTypes}" var="at">  
                                                                <p:column>  
                                                                    <f:facet name="header">  
                                                                        <h:outputText value="ename" />  
                                                                    </f:facet>  
                                                                    <h:outputText value="#{at.attributeType.name}"/> 
                                                                </p:column>  
                                                                <p:column>  
                                                                    <f:facet name="header">  
                                                                        <h:outputText value="value" />  
                                                                    </f:facet>  
                                                                    <h:outputText value="#{at.value}" />  
                                                                </p:column>  
                                                            </p:dataTable>  
                                                            <br/>
                                                            <p:dataTable emptyMessage="Add Attributes" id="enewatt" scrollHeight="500" value="#{viewAndEditTranServiceBean.tranServiceAttributesDataModel}" var="tsa">  
                                                                <p:column>  
                                                                    <f:facet name="header">  
                                                                        <h:outputText value="ename" />  
                                                                    </f:facet>  
                                                                    <h:outputText value="#{tsa.tranServiceTypeAttributeType.attributeType.name}" /> 
                                                                    <f:facet name="footer">  
                                                                        <p:selectOneMenu   required="false"   id="eatt" value="#{viewAndEditTranServiceBean.atid}">
                                                                            <f:selectItem noSelectionOption="true" itemLabel="add attribute" itemValue="" />
                                                                            <f:selectItems   value="#{viewAndEditTranServiceBean.aT}" />
                                                                        </p:selectOneMenu>
                                                                    </f:facet>  
                                                                </p:column>  
                                                                <p:column>  
                                                                    <f:facet name="header">  
                                                                        <h:outputText value="value" />  
                                                                    </f:facet>  
                                                                    <h:outputText value="#{tsa.value}"  />  
                                                                    <f:facet name="footer">  
                                                                        <p:inputText validatorMessage="invalid value "   id="evalue"  label="value"  
                                                                                     value="#{viewAndEditTranServiceBean.atvalue}" >
                                                                            <f:validateRegex  pattern="^[a-zA-Z0-9]*$"/> 
                                                                        </p:inputText>
                                                                        <p:commandButton   value="add" id="eajax" >
                                                                            <f:ajax execute="evalue eatt"   render="enewatt :editTSForm:egrowl"  
                                                                                    listener="#{viewAndEditTranServiceBean.addatttolist()}" />
                                                                        </p:commandButton>
                                                                    </f:facet>  
                                                                </p:column>  
                                                            </p:dataTable> 
                                                        </h:panelGrid>  
                                                    </p:panel>  
                                                </p:tab>  
                                                <p:tab id="etsrw" title="Away Route" >  
                                                    <p:panel>
                                                        <p:toolbar id="etoolbar" styleClass="ui-panel-titlebar ui-widget-header">
                                                            <p:toolbarGroup id="egptb" align="left">                     
                                                                <p:commandButton styleClass="btns"   update="et1lat,et1lng,et2lat,et2lng,ewaypoint,egrowl" oncomplete="ecalcRoute()"  value="Draw" action="#{viewAndEditTranServiceBean.save}" />
                                                                <p:commandButton styleClass="btns" id="eclear"   update="et1lat,et1lng,et2lat,et2lng,ewaypoint,eterminals,epoints" value="clear" action="#{viewAndEditTranServiceBean.clearall}" onclick="eclearall()" />
                                                            </p:toolbarGroup>
                                                        </p:toolbar>
                                                        <p:outputPanel id="edirectionsPanel" styleClass="directionsPanel" rendered="false"  style="width:600px" layout="block"/> 
                                                        <p:panelGrid styleClass="gridpan">  
                                                            <p:row>
                                                                <p:column>
                                                                    <p:gmap center="30.0522867441376,31.4069294929504"  zoom="10" type="ROADMAP" 
                                                                            style="width:600px;height:400px"
                                                                            model="#{viewAndEditTranServiceBean.simpleModel}"
                                                                            onPointClick="ehandlePointClick(event);"
                                                                            widgetVar="ecliMap" fitBounds="true"
                                                                            id="emap">
                                                                        <p:ajax event="overlaySelect"  oncomplete="eafterrequest()" onstart="eberforerequest()" update="emap,eterminals,epoints,egrowl" listener="#{viewAndEditTranServiceBean.onMarkerSelect}"  />
                                                                    </p:gmap>
                                                                </p:column>
                                                                <p:column styleClass="tablepoints">
                                                                    <p:panelGrid columns="1" >
                                                                        <p:row>
                                                                            <p:dataTable id="eterminals" var="point"  value="#{viewAndEditTranServiceBean.terminalMarkers}" liveResize="true" >
                                                                                <f:facet name="header">
                                                                                    Terminal points
                                                                                </f:facet>
                                                                                <p:column headerText="Name">
                                                                                    <h:outputText value="#{point.title}" />
                                                                                </p:column>
                                                                                <p:column styleClass="col" headerText="Where">
                                                                                    <p:commandButton  styleClass="btntable"  oncomplete="eafterrequest()" onstart="eberforerequest()"  value="Show" actionListener="#{viewAndEditTranServiceBean.showmarker(point.latlng)}" update=":editTSForm:emap"  />
                                                                                </p:column>
                                                                            </p:dataTable>
                                                                        </p:row>
                                                                        <p:row>
                                                                            <p:dataTable id="epoints"    var="point" value="#{viewAndEditTranServiceBean.pointsMarkers}"    >
                                                                                <p:ajax event="rowReorder"  update=":editTSForm:emap" />
                                                                                <f:facet name="header">
                                                                                    points
                                                                                </f:facet>
                                                                                <p:column headerText="Name">
                                                                                    <h:outputText value="#{point.title}" />
                                                                                </p:column>
                                                                                <p:column styleClass="col" headerText="Where">
                                                                                    <p:commandButton styleClass="btntable" value="show" oncomplete="eafterrequest()" onstart="eberforerequest()" actionListener="#{viewAndEditTranServiceBean.showmarker(point.latlng)}"  update=":editTSForm:emap"  />
                                                                                </p:column>
                                                                            </p:dataTable>
                                                                        </p:row>
                                                                    </p:panelGrid>
                                                                </p:column>
                                                            </p:row>
                                                        </p:panelGrid>  
                                                    </p:panel>
                                                </p:tab> 
                                                <p:tab id="etsrh" title="Home Route">  
                                                    <p:panel>
                                                        <p:toolbar styleClass="ui-panel-titlebar ui-widget-header">
                                                            <p:toolbarGroup align="left">                     
                                                                <p:commandButton styleClass="btns" update="et1lat,et1lng,et2lat,et2lng,ewaypointh,egrowl" oncomplete="ecalcRouteh()"  value="Draw" action="#{viewAndEditTranServiceBean.save}" />
                                                                <p:commandButton styleClass="btns"   update="et1lat,et1lng,et2lat,et2lng,ewaypointh,epointsh" value="clear" action="#{viewAndEditTranServiceBean.clearallForHome}" onclick="eclearall()" />
                                                            </p:toolbarGroup>
                                                        </p:toolbar>
                                                        <p:panelGrid>  
                                                            <p:row>
                                                                <p:column>
                                                                    <p:gmap center="30.0522867441376,31.4069294929504" zoom="10" type="ROADMAP" 
                                                                            style="width:600px;height:400px"
                                                                            model="#{viewAndEditTranServiceBean.simpleModel}"
                                                                            onPointClick="ehandlePointClick(event);"
                                                                            widgetVar="ecliMaph" fitBounds="true"
                                                                            id="emaph">
                                                                        <p:ajax event="overlaySelect"  oncomplete="eafterrequesth()" onstart="eberforerequesth()" update="emaph,epointsh,egrowl" listener="#{viewAndEditTranServiceBean.onMarkerSelect}"  />
                                                                    </p:gmap>
                                                                </p:column>
                                                                <p:column styleClass="tablepoints">
                                                                    <p:panelGrid columns="1" >
                                                                        <p:row>
                                                                            <p:dataTable id="eterminalsh" var="point" value="#{viewAndEditTranServiceBean.terminalMarkers}" >
                                                                                <f:facet name="header">
                                                                                    Terminal points
                                                                                </f:facet>
                                                                                <p:column headerText="Name">
                                                                                    <h:outputText value="#{point.title}" />
                                                                                </p:column>
                                                                                <p:column styleClass="col" headerText="Where">
                                                                                    <p:commandButton styleClass="btntable" oncomplete="eafterrequesth()" onstart="eberforerequesth()"  value="Show" actionListener="#{viewAndEditTranServiceBean.showmarker(point.latlng)}" update=":editTSForm:emaph"  />
                                                                                </p:column>
                                                                            </p:dataTable>
                                                                        </p:row>
                                                                        <p:row>
                                                                            <p:dataTable id="epointsh" var="point" value="#{viewAndEditTranServiceBean.hpointsMarkers}"    >
                                                                                <p:ajax event="rowReorder"  update=":editTSForm:emaph" />
                                                                                <f:facet name="header">
                                                                                    points
                                                                                </f:facet>
                                                                                <p:column headerText="Name">
                                                                                    <h:outputText value="#{point.title}" />
                                                                                </p:column>
                                                                                <p:column styleClass="col" headerText="Where">
                                                                                    <p:commandButton styleClass="btntable" value="show" oncomplete="eafterrequesth()" onstart="eberforerequesth()" actionListener="#{viewAndEditTranServiceBean.showmarker(point.latlng)}"  update=":editTSForm:emaph"  />
                                                                                </p:column>
                                                                            </p:dataTable>
                                                                        </p:row>
                                                                    </p:panelGrid>
                                                                </p:column>
                                                            </p:row>
                                                        </p:panelGrid>  
                                                    </p:panel>
                                                </p:tab>  
                                                <p:tab id="econfirm" title="Confirm">  
                                                    <p:panel>  
                                                        <h:panelGrid id="econfirmation" > 
                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="Transportation ename: " /> 
                                                                </p:column>
                                                                <p:column>
                                                                    <h:outputText styleClass="outputLabel"  
                                                                                  value="#{viewAndEditTranServiceBean.tranService.name}" />  
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="Transportation Service: " />  
                                                                </p:column>
                                                                <p:column>
                                                                    <h:outputText styleClass="outputLabel"  
                                                                                  value="#{viewAndEditTranServiceBean.tranService.tranServiceType.name}" /> 
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="Transportation Service Attribute: " />  
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <ui:repeat value="#{viewAndEditTranServiceBean.tranServiceAttributesDataModel}" var="items" varStatus="loop">
                                                                    <h:outputText value="#{items.tranServiceTypeAttributeType.attributeType.name}" /> :  <h:outputText value="#{items.value}" /> <br/> 
                                                                </ui:repeat>
                                                            </p:row>

                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="Terminal Home: " />  
                                                                </p:column>
                                                                <p:column>
                                                                    <h:outputText styleClass="outputLabel"  
                                                                                  value="#{viewAndEditTranServiceBean.tranService.terminalByTerminal1.point.name}" /> 
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="Terminal Away: " /> 
                                                                </p:column>
                                                                <p:column>
                                                                    <h:outputText styleClass="outputLabel"  
                                                                                  value="#{viewAndEditTranServiceBean.tranService.terminalByTerminal2.point.name}" /> 
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="route" />  
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <p:dataTable id="ecars" var="car" value="#{viewAndEditTranServiceBean.tsrs}">                    
                                                                    <p:column sortBy="#{car.point.name}" >
                                                                        <f:facet name="header">
                                                                            <h:outputText value="Name" />
                                                                        </f:facet>
                                                                        <h:outputText value="#{car.point.name}" />
                                                                    </p:column>
                                                                    <p:column sortBy="#{car.awayOrder}" >
                                                                        <f:facet name="header">
                                                                            <h:outputText value="away order" />
                                                                        </f:facet>
                                                                        <h:outputText value="#{car.awayOrder}" />
                                                                    </p:column>
                                                                    <p:column sortBy="#{car.homeOrder}" >
                                                                        <f:facet name="header">
                                                                            <h:outputText value="home order" />
                                                                        </f:facet>
                                                                        <h:outputText value="#{car.homeOrder}" />
                                                                    </p:column>
                                                                </p:dataTable>
                                                            </p:row>
                                                        </h:panelGrid>  
                                                        <p:commandButton   update="egrowl" value="Submit" actionListener="#{viewAndEditTranServiceBean.add}"/>  
                                                    </p:panel>  
                                                </p:tab>  
                                            </p:wizard>  
                                        </h:form> 
                                    </div> <!-- /.toggle-content -->
                                    <div class="toggle-content" id="tab3">
                                        <h2 class="page-title">Add transportation</h2>
                                        <h:form prependId="false" id="addTSForm"  >  
                                            <p:growl id="growl" showDetail="true" sticky="false" life="6000"  />  
                                            <p:dialog widgetVar="dlg" showEffect="fade">
                                                <h:panelGrid columns="2">
                                                    <f:facet name="header">
                                                        <p:outputLabel value="New Point"/>
                                                    </f:facet>
                                                    <h:outputLabel for="title" value="Title:" />
                                                    <p:inputText  validatorMessage="invalid Name " id="title" value="#{tranServiceBeanWizerd.title}" >
                                                        <f:validateRegex  pattern="^[a-zA-Z]+( [a-zA-Z]+)*$"/> 
                                                    </p:inputText>
                                                    <p:outputLabel for="console" value="Type: " />
                                                    <p:selectOneRadio id="console" value="#{tranServiceBeanWizerd.type}">
                                                        <f:selectItem itemLabel="Terminal" itemValue="Terminal" />
                                                        <f:selectItem itemLabel="Stop" itemValue="Stop" />
                                                        <f:selectItem itemLabel="Point" itemValue="Point" />
                                                    </p:selectOneRadio>
                                                    <f:facet name="footer">
                                                        <p:commandButton value="Add" actionListener="#{tranServiceBeanWizerd.newPoint()}" update=":addTSForm:map,:addTSForm:maph" oncomplete="markerAddComplete()" />
                                                        <p:commandButton value="Cancel" onclick="return cancel()" />
                                                    </f:facet>
                                                </h:panelGrid>
                                                <h:inputHidden id="Nlat" value="#{tranServiceBeanWizerd.lat}"  />
                                                <h:inputHidden id="Nlng" value="#{tranServiceBeanWizerd.lng}" />
                                            </p:dialog>
                                            <h:inputHidden id="t1lat" value="#{tranServiceBeanWizerd.t1Lat}"  />
                                            <h:inputHidden id="t1lng" value="#{tranServiceBeanWizerd.t1Lng}" />
                                            <h:inputHidden id="t2lat" value="#{tranServiceBeanWizerd.t2Lat}" />
                                            <h:inputHidden id="t2lng" value="#{tranServiceBeanWizerd.t2Lng}" />
                                            <h:inputHidden id="waypoint" value="#{tranServiceBeanWizerd.request}" />  
                                            <h:inputHidden id="waypointh" value="#{tranServiceBeanWizerd.requesth}" />  
                                            <p:wizard flowListener="#{tranServiceBeanWizerd.onFlowProcess}"  >  
                                                <p:tab id="ts" title="Transportation Service">  
                                                    <p:panel>  
                                                        <h:messages errorClass="error"/>  
                                                        <br/>
                                                        <h:panelGrid columns="2" columnClasses="label, value" styleClass="grid">  
                                                            <h:outputText value="Name: *" /> 
                                                            <br/>
                                                            <p:inputText validatorMessage="invalid Name " required="true" requiredMessage="Please enter Transportation Service Name!" label="Name"  
                                                                         value="#{tranServiceBeanWizerd.tranService.name}" >
                                                                <f:validateRegex  pattern="^[a-zA-Z]+( [a-zA-Z]+)*$"/> 
                                                            </p:inputText>
                                                            <br/>
                                                            <h:outputText value="Transportation Type: *" /> 
                                                            <br/>
                                                            <p:selectOneMenu required="true" requiredMessage="Please select Transportation Type!" id="ecity" value="#{tranServiceBeanWizerd.tstid}">
                                                                <f:selectItem  itemLabel="Select Transportation Type" itemValue=""  />
                                                                <f:selectItems  value="#{tranServiceBeanWizerd.tST}" />
                                                                <p:ajax  update="suburbs" 
                                                                         listener="#{tranServiceBeanWizerd.handleTSTChange()}" />
                                                                <p:ajax  update="newatt:att,newatt"/>
                                                            </p:selectOneMenu>
                                                            <br/>
                                                            <h:outputText value="Default Attributes" /> 
                                                            <br/>
                                                            <p:dataTable  id="suburbs" value="#{tranServiceBeanWizerd.tSTAttributeTypes}" var="at">  
                                                                <p:column>  
                                                                    <f:facet name="header">  
                                                                        <h:outputText value="name" />  
                                                                    </f:facet>  
                                                                    <h:outputText value="#{at.attributeType.name}"/> 
                                                                </p:column>  
                                                                <p:column>  
                                                                    <f:facet name="header">  
                                                                        <h:outputText value="value" />  
                                                                    </f:facet>  
                                                                    <h:outputText value="#{at.value}" />  
                                                                </p:column>  
                                                            </p:dataTable>  
                                                            <br/>
                                                            <p:dataTable emptyMessage="Add Attributes" id="newatt" value="#{tranServiceBeanWizerd.tranServiceAttributesDataModel}" var="tsa">  
                                                                <p:column>  
                                                                    <f:facet name="header">  
                                                                        <h:outputText value="name" />  
                                                                    </f:facet>  
                                                                    <h:outputText value="#{tsa.tranServiceTypeAttributeType.attributeType.name}" /> 
                                                                    <f:facet name="footer">  
                                                                        <p:selectOneMenu required="false"   id="att" value="#{tranServiceBeanWizerd.atid}">
                                                                            <f:selectItem noSelectionOption="true" itemLabel="add attribute" itemValue="" />
                                                                            <f:selectItems   value="#{tranServiceBeanWizerd.aT}" />
                                                                        </p:selectOneMenu>
                                                                    </f:facet>  
                                                                </p:column>  
                                                                <p:column>  
                                                                    <f:facet name="header">  
                                                                        <h:outputText value="value" />  
                                                                    </f:facet>  
                                                                    <h:outputText value="#{tsa.value}"  />  
                                                                    <f:facet name="footer">  
                                                                        <p:inputText validatorMessage="invalid Value " id="value"  label="value"  
                                                                                     value="#{tranServiceBeanWizerd.atvalue}" >
                                                                            <f:validateRegex  pattern="^[a-zA-Z0-9]*$"/> 
                                                                        </p:inputText>
                                                                        <p:commandButton value="add" id="ajax" >
                                                                            <f:ajax execute="value att"   render="newatt :addTSForm:growl" listener="#{tranServiceBeanWizerd.addatttolist()}" />
                                                                        </p:commandButton>
                                                                    </f:facet>  
                                                                </p:column>  
                                                            </p:dataTable> 
                                                        </h:panelGrid>  
                                                    </p:panel>  
                                                </p:tab>  
                                                <p:tab id="tsrw" title="Away Route" >  
                                                    <p:panel>
                                                        <p:toolbar styleClass="ui-panel-titlebar ui-widget-header">
                                                            <p:toolbarGroup align="left">                     
                                                                <p:commandButton styleClass="btns"  update="t1lat,t1lng,t2lat,t2lng,waypoint,growl"   oncomplete="calcRoute()"  value="Draw" action="#{tranServiceBeanWizerd.save}" />
                                                                <p:commandButton styleClass="btns" update="t1lat,t1lng,t2lat,t2lng,waypoint,terminals,points" value="clear" action="#{tranServiceBeanWizerd.clearall}" onclick="clearall()"   />
                                                            </p:toolbarGroup>
                                                        </p:toolbar>
                                                        <p:outputPanel id="directionsPanel" styleClass="directionsPanel" rendered="false"  style="width:600px" layout="block"/> 
                                                        <p:panelGrid styleClass="gridpan">  
                                                            <p:row>
                                                                <p:column>
                                                                    <p:gmap center="30.0522867441376,31.4069294929504" zoom="10" type="ROADMAP" 
                                                                            style="width:600px;height:400px"
                                                                            model="#{tranServiceBeanWizerd.simpleModel}"
                                                                            onPointClick="handlePointClick(event);"
                                                                            widgetVar="cliMap" fitBounds="true"
                                                                            id="map">
                                                                        <p:ajax event="overlaySelect"  oncomplete="afterrequest()" onstart="berforerequest()" update="map,terminals,points,growl" listener="#{tranServiceBeanWizerd.onMarkerSelect}"  />
                                                                    </p:gmap>
                                                                </p:column>
                                                                <p:column styleClass="tablepoints">
                                                                    <p:panelGrid columns="1" styleClass="gridpan" >
                                                                        <p:row>
                                                                            <p:dataTable id="terminals" var="point" value="#{tranServiceBeanWizerd.terminalMarkers}" liveResize="true" >
                                                                                <f:facet name="header">
                                                                                    Terminal points
                                                                                </f:facet>


                                                                                <p:column headerText="Name">
                                                                                    <h:outputText value="#{point.title}" />
                                                                                </p:column>

                                                                                <p:column styleClass="col" headerText="Where">
                                                                                    <p:commandButton styleClass="btntable" oncomplete="afterrequest()" onstart="berforerequest()"  value="Show" actionListener="#{tranServiceBeanWizerd.showmarker(point.latlng)}" update=":addTSForm:map"  />
                                                                                </p:column>

                                                                            </p:dataTable>
                                                                        </p:row>
                                                                        <p:row>
                                                                            <p:dataTable id="points"  var="point" value="#{tranServiceBeanWizerd.pointsMarkers}" draggableRows="true"  >
                                                                                <p:ajax event="rowReorder"  update=":addTSForm:map" />
                                                                                <f:facet name="header">
                                                                                    points
                                                                                </f:facet>

                                                                                <p:column headerText="Name">
                                                                                    <h:outputText value="#{point.title}" />
                                                                                </p:column>
                                                                                <p:column styleClass="col" headerText="Where">
                                                                                    <p:commandButton styleClass="btntable" value="show" oncomplete="afterrequest()" onstart="berforerequest()" actionListener="#{tranServiceBeanWizerd.showmarker(point.latlng)}"  update=":addTSForm:map"  />
                                                                                </p:column>

                                                                            </p:dataTable>
                                                                        </p:row>
                                                                    </p:panelGrid>
                                                                </p:column>
                                                            </p:row>
                                                        </p:panelGrid>  
                                                    </p:panel>
                                                </p:tab> 
                                                <p:tab id="tsrh" title="Home Route ">  
                                                    <p:panel>
                                                        <p:toolbar styleClass="ui-panel-titlebar ui-widget-header">
                                                            <p:toolbarGroup align="left">                     
                                                                <p:commandButton styleClass="btns"  update="t1lat,t1lng,t2lat,t2lng,waypointh,growl"   oncomplete="calcRouteh()"  value="Draw" action="#{tranServiceBeanWizerd.save}" />
                                                                <p:commandButton styleClass="btns" update="t1lat,t1lng,t2lat,t2lng,waypointh,pointsh" value="clear" action="#{tranServiceBeanWizerd.clearallForHome}" onclick="clearall()"   />
                                                            </p:toolbarGroup>
                                                        </p:toolbar>
                                                        <p:panelGrid>  
                                                            <p:row>
                                                                <p:column>
                                                                    <p:gmap center="30.0522867441376,31.4069294929504" zoom="10" type="ROADMAP" 
                                                                            style="width:600px;height:400px"
                                                                            model="#{tranServiceBeanWizerd.simpleModel}"
                                                                            onPointClick="handlePointClick(event);"
                                                                            widgetVar="cliMaph" fitBounds="true"
                                                                            id="maph">
                                                                        <p:ajax event="overlaySelect"  oncomplete="afterrequesth()" onstart="berforerequesth()" onsuccess="#{tranServiceBeanWizerd.test()}" update="maph,pointsh,growl" listener="#{tranServiceBeanWizerd.onMarkerSelect}"  />
                                                                    </p:gmap>
                                                                </p:column>
                                                                <p:column styleClass="tablepoints">
                                                                    <p:panelGrid columns="1" >
                                                                        <p:row>
                                                                            <p:dataTable id="terminalsh" var="point" value="#{tranServiceBeanWizerd.terminalMarkers}" liveResize="true" >
                                                                                <f:facet name="header">
                                                                                    Terminal points
                                                                                </f:facet>

                                                                                <p:column headerText="Name">
                                                                                    <h:outputText value="#{point.title}" />
                                                                                </p:column>
                                                                                <p:column styleClass="col" headerText="Where">
                                                                                    <p:commandButton styleClass="btntable" oncomplete="afterrequesth()" onstart="berforerequesth()"  value="Show" actionListener="#{tranServiceBeanWizerd.showmarker(point.latlng)}" update=":addTSForm:maph"  />
                                                                                </p:column>
                                                                            </p:dataTable>
                                                                        </p:row>
                                                                        <p:row>
                                                                            <p:dataTable id="pointsh" var="point" value="#{tranServiceBeanWizerd.hpointsMarkers}" draggableRows="true"  >
                                                                                <p:ajax event="rowReorder"  update=":addTSForm:maph" />
                                                                                <f:facet name="header">
                                                                                    <h:outputText value="Points" />
                                                                                </f:facet>

                                                                                <p:column headerText="Name">
                                                                                    <h:outputText value="#{point.title}" />
                                                                                </p:column>
                                                                                <p:column styleClass="col" headerText="Where">
                                                                                    <p:commandButton styleClass="btntable" value="show" oncomplete="afterrequesth()" onstart="berforerequesth()" actionListener="#{tranServiceBeanWizerd.showmarker(point.latlng)}"  update=":addTSForm:maph"  />
                                                                                </p:column>
                                                                            </p:dataTable>
                                                                        </p:row>
                                                                    </p:panelGrid>
                                                                </p:column>
                                                            </p:row>
                                                        </p:panelGrid>  
                                                    </p:panel>
                                                </p:tab>  
                                                <p:tab id="confirm" title="Confirm">  
                                                    <p:panel>  
                                                        <h:panelGrid id="confirmation" > 
                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="Transportation name: " /> 
                                                                </p:column>
                                                                <p:column>
                                                                    <h:outputText styleClass="outputLabel" value="#{tranServiceBeanWizerd.tranService.name}" />  
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="Transportation Service: " />  
                                                                </p:column>
                                                                <p:column>
                                                                    <h:outputText styleClass="outputLabel" value="#{tranServiceBeanWizerd.tranService.tranServiceType.name}" /> 
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="Transportation Service Attribute: " />  
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <ui:repeat value="#{tranServiceBeanWizerd.tranServiceAttributesDataModel}" var="item" varStatus="loop">
                                                                    <h:outputText value="#{item.tranServiceTypeAttributeType.attributeType.name}" /> :  <h:outputText value="#{item.value}" /> <br/> 
                                                                </ui:repeat>
                                                            </p:row>
                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="Terminal Home: " />  
                                                                </p:column>
                                                                <p:column>
                                                                    <h:outputText styleClass="outputLabel" value="#{tranServiceBeanWizerd.t1.point.name}" /> 
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="Terminal Away: " /> 
                                                                </p:column>
                                                                <p:column>
                                                                    <h:outputText styleClass="outputLabel" value="#{tranServiceBeanWizerd.t2.point.name}" /> 
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <p:column>
                                                                    <h:outputText value="route" />  
                                                                </p:column>
                                                            </p:row>
                                                            <p:row>
                                                                <p:dataTable id="cars" var="car" value="#{tranServiceBeanWizerd.tsrs}">                    
                                                                    <p:column sortBy="#{car.point.name}" >
                                                                        <f:facet name="header">
                                                                            <h:outputText value="away order" />
                                                                        </f:facet>
                                                                        <h:outputText value="#{car.point.name}" />
                                                                    </p:column>
                                                                    <p:column sortBy="#{car.awayOrder}" >
                                                                        <f:facet name="header">
                                                                            <h:outputText value="away order" />
                                                                        </f:facet>
                                                                        <h:outputText value="#{car.awayOrder}" />
                                                                    </p:column>
                                                                    <p:column sortBy="#{car.homeOrder}" >
                                                                        <f:facet name="header">
                                                                            <h:outputText value="home order" />
                                                                        </f:facet>
                                                                        <h:outputText value="#{car.homeOrder}" />
                                                                    </p:column>
                                                                </p:dataTable>
                                                            </p:row>
                                                        </h:panelGrid>  
                                                        <p:commandButton update="growl" value="Submit"    
                                                                         actionListener="#{tranServiceBeanWizerd.add}"/>  
                                                    </p:panel>  
                                                </p:tab>  
                                            </p:wizard>  
                                        </h:form> 
                                    </div> <!-- /.toggle-content -->
                                    <div class="toggle-content" id="tabfeed">
                                        <h2 class="page-title">Comments and FeedBack</h2>
                                        <h:form id="cfb">
                                            <h2 class="page-title">FeedBacks</h2>
                                            <p:dataTable id="fb" var="Feed"  scrollable="true" scrollHeight="250">  

                                            </p:dataTable> 
                                            <h2 class="page-title">Comments</h2>
                                            <p:dataTable  id="com" var="Com" scrollable="true" scrollHeight="250">  

                                            </p:dataTable> 
                                        </h:form>
                                    </div> <!-- /.toggle-content -->
                                </div> <!-- /.inner-content -->
                            </div> <!-- /.col-md-9 -->
                            <div class="col-md-3 col-sm-2">
                                <div id="icons">
                                    <ul class="tabs">
                                        <li>
                                            <a href="#tab1" onclick="hideMyDivts()" class="icon-item">
                                                <span>view</span>
                                            </a> <!-- /.icon-item -->
                                        </li>
                                        <li>
                                            <a style="display: none;" href="#tab2" class="icon-item">
                                                <span>edit</span>
                                            </a> <!-- /.icon-item -->
                                        </li>
                                        <li>
                                            <a  href="#tab3" onclick="hideMyDivts()" class="icon-item">
                                                <span>add</span>
                                            </a> <!-- /.icon-item -->
                                        </li>
                                        <li>
                                            <a  href="#tabfeed" style="display: none;"  class="icon-item">
                                                <span>feedback</span>
                                            </a> <!-- /.icon-item -->
                                        </li>
                                    </ul>
                                </div> <!-- /.icons -->
                            </div> <!-- /.col-md-3 -->
                        </div> <!-- /.row -->
                    </div> <!-- /.container -->	
                </div> <!-- /.services -->
                <div class="content about" id="menu-4">
                    <div class="container">
                        <div class="row">
                            <div class="col-md-9 col-sm-10">
                                <div class="about-us-content">
                                    <div class="toggle-content" id="tab4">
                                        <h:form id="userForm">
                                            <h2 class="page-title">Users</h2>
                                            <h:panelGrid columns="2" cellpadding="10">  
                                                <p:dataTable id="tb77" var="userS"    selection="#{usersBean.u}" rowKey="#{userS.id}" selectionMode="single"    value="#{usersBean.users}"  scrollable="true" scrollHeight="500">  
                                                    <p:ajax event="rowSelect"  oncomplete="openMyDiv1()"  listener="#{usersBean.loadFeedback}" update=":feedbackform:tb88,:feedbackform:tb99"  />
                                                    <p:column>  
                                                        <f:facet name="header">  
                                                            <h:outputText value="ID" />  
                                                        </f:facet>  
                                                        <h:outputText value="#{userS.id}" />
                                                    </p:column>  
                                                    <p:column>  
                                                        <f:facet name="header">  
                                                            <h:outputText value="Email" />  
                                                        </f:facet>  
                                                        <h:outputText value="#{userS.email}"/>
                                                    </p:column> 
                                                    <p:column>
                                                        <f:facet name="header">
                                                            <h:outputText value="Delete"/>
                                                        </f:facet>

                                                        <p:commandButton value="Delete" actionListener="#{usersBean.deleteuser}" update=":userForm:tb77">
                                                        </p:commandButton>
                                                    </p:column>
                                                </p:dataTable>  
                                            </h:panelGrid>
                                        </h:form>
                                    </div> <!-- /.toggle-content -->
                                    <div class="toggle-content" id="tab5">
                                        <h:form id="feedbackform">
                                            <h2 class="page-title">FeedBacks</h2>
                                            <p:dataTable value="#{usersBean.feedbacks}" id="tb88" var="userFeed"  scrollable="true" scrollHeight="250">  
                                                <p:column>  
                                                    <f:facet name="header">  
                                                        <h:outputText value="User ID" />  
                                                    </f:facet>  
                                                    <h:outputText value="#{userFeed.id}" />  
                                                </p:column>  
                                                <p:column>  
                                                    <f:facet name="header">  
                                                        <h:outputText value="Rating" />  
                                                    </f:facet>  
                                                    <h:outputText value="#{userFeed.rating}"/>  
                                                </p:column>  
                                                <p:column>  
                                                    <f:facet name="header">  
                                                        <h:outputText value="Transervice ID" />  
                                                    </f:facet>  
                                                    <h:outputText value="#{userFeed.tranService.id}"/>  
                                                </p:column> 
                                                <p:column>  
                                                    <f:facet name="header">  
                                                        <h:outputText value="Transervice Name" />  
                                                    </f:facet>  
                                                    <h:outputText value="#{userFeed.tranService.name}"/>  
                                                </p:column>  
                                            </p:dataTable> 
                                            <h2 class="page-title">Comments</h2>
                                            <p:dataTable value="#{usersBean.commentses}" id="tb99" var="userCom" scrollable="true" scrollHeight="250">  
                                                <p:column>  
                                                    <f:facet name="header">  
                                                        <h:outputText value="User ID" />  
                                                    </f:facet>  
                                                    <h:outputText value="#{userCom.user.id}" />  
                                                </p:column>  
                                                <p:column>  
                                                    <f:facet name="header">  
                                                        <h:outputText value="Comments" />  
                                                    </f:facet>  
                                                    <h:outputText value="#{userCom.comment}"/>  
                                                </p:column>  
                                                <p:column>  
                                                    <f:facet name="header">  
                                                        <h:outputText value="Transervice ID" />  
                                                    </f:facet>  
                                                    <h:outputText value="#{userCom.tranService.id}"/>  
                                                </p:column> 
                                                <p:column>  
                                                    <f:facet name="header">  
                                                        <h:outputText value="Transervice Name" />  
                                                    </f:facet>  
                                                    <h:outputText value="#{userCom.tranService.name}"/>  
                                                </p:column>  
                                            </p:dataTable> 
                                        </h:form>
                                    </div> <!-- /.toggle-content -->
                                </div> <!-- /.inner-content -->
                            </div> <!-- /.col-md-9 -->
                            <div class="col-md-3 col-sm-2">
                                <div id="icons-about">
                                    <ul class="tabs">
                                        <li>
                                            <a href="#tab4" onclick="hideMyDiv1()" class="icon-item">
                                                <span>Users Info</span>
                                            </a> <!-- /.icon-item -->
                                        </li>
                                        <li>
                                            <a href="#tab5" style="display: none;" class="icon-item">
                                                <span>FeedBacks and Comments</span>
                                            </a> <!-- /.icon-item -->
                                        </li>
                                    </ul>
                                </div> <!-- /.icons -->
                            </div> <!-- /.col-md-3 -->
                        </div> <!-- /.row -->
                    </div> <!-- /.container -->
                </div> <!-- /.services -->
            </div> <!-- /#menu-container -->
            <div id="templatemo_footer">
                <div class="container">
                    <div class="row">
                        <div class="col-md-12 text-center">
                            <p>Copyright &copy; ITI | by <a href="http://www.iti.gov.eg" rel="nofollow">ITI</a></p>
                        </div> <!-- /.col-md-12 -->
                    </div> <!-- /.row -->
                </div> <!-- /.container -->
            </div> <!-- /.templatemo_footer -->
        </div>
        <h:outputScript library="scripts" name="bootstrap.js"/>
        <h:outputScript library="scripts" name="jquery.lightbox.js"/>
        <h:outputScript library="scripts" name="jquery-1.10.2.min.js"/>
        <h:outputScript library="scripts" name="jquery-migrate-1.2.1.min.js"/>
        <h:outputScript library="scripts" name="modernizr.js"/>
        <h:outputScript library="scripts" name="tabs.js"/>
        <h:outputScript library="scripts" name="templatemo_custom.js"/>
        <h:outputScript library="js" name="map.js"/>
        <script type='text/javascript'>
    var $jq = jQuery.noConflict(true);
function openMyDiv() {
    console.log("tab11");
    $("#tab10").hide();
$("#tab11").slideDown();     }
            function hideMyDiv() {
                $("#tab11").hide();
            }
            function openMyDiv1() {
                console.log("tab5");
                $("#tab4").hide();
                $("#tab5").slideDown();
            }
            function hideMyDiv1() {
                $("#tab5").hide();
            }
            function openMyDivts() {
                $("#tab1").hide();
                $("#tab2").slideDown();
            }
            function hideMyDivts() {
                $("#tab2").hide();
                $("#tabfeed").hide();
            }
            function openfeedbackdiv() {
                $("#tab2").hide();
                $("#tabfeed").slideDown();
            }
        </script> 
    </h:body>
</html>